package com.hiss.basic.model.system.response;

import com.hiss.basic.starter.core.utils.tree.TreeNode;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 系统部门树形查询响应
 */
@Data
public class SysDeptQueryTreeResponse implements TreeNode<Long, Integer>, Serializable {

    private static final long serialVersionUID = 1;

    private Long id;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 备注
     */
    private String remark;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 上级部门 ID
     */
    private Long parentId;

    /**
     * 部门领导
     */
    private Long leaderId;

    /**
     * 启用状态
     *
     * @see com.hiss.basic.starter.core.enums.EnableStatusEnum
     */
    private Integer enableStatus;

    private LocalDateTime createTime;

    private List<TreeNode<Long, Integer>> children;

    @Override
    public Integer getWeight() {
        return this.sort;
    }

    @Override
    public void setWeight(Integer weight) {
        this.sort = weight;
    }
}
